// 提示操作返回的信息
function opertaionPrompt(response) {
	var result = response.responseText;
	var jsonreslt = eval('(' + result + ')');
	showMsg(jsonreslt.message,"info");
}

function currDictionaryFormatter(cellvalue, options, rowObject){
	// 获取字典的信息
	var temp = dictionary;
	alert(temp);
	var formattext = '';
	var obj = dictionary[options.colModel.dictionary];
	$(obj).each(function(){ 
		if(this.OPTVALUE == cellvalue){
			formattext = this.OPTNAME;
		}
	}); 
	
	return formattext;
}

/**
 * 日期选择
 * @param elem
 */
function datePick(elem){
	$(elem).datepicker({
		changeMonth : true,
        changeYear : true,
        dateFormat : 'yy-mm-dd'
	});
}

/**
 * 返回当前时间
 * @param num
 * @returns {String}
 */
function CurrentTime(num){
	var Year = 0;
	var Month = 0;
	var Day = 0;
	var Hour = 0;
	var Minute = 0;
	var Second = 0;
	
	var format = "";
	
	var currentDate = new Date();
	
	Year = currentDate.getFullYear();
	Month = currentDate.getMonth() + 1;
	Day = currentDate.getDate();
	Hour = currentDate.getHours();
	Minute = currentDate.getMinutes();
	Second = currentDate.getSeconds();
	
	format = Year + "-";
	

	
	if(Month >= 10){
		format = format + Month + "-";
	}else{
		format = format + "0" + Month + "-";
	}
	
	if(Day >= 10){
		format = format + Day;
	}else{
		format = format + "0" + Day ;
	}
	
	
	if(num == 6){
		
		if(Hour >= 10){
			format = format + " " + Hour;
		}else{
			format = format + " 0" + Day ;
		}
		
		if(Minute >= 10){
			format = format + ":" + Minute;
		}else{
			format = format + ":0" + Minute ;
		}
		
		if(Second >= 10){
			format = format + ":" + Second;
		}else{
			format = format + ":0" + Second ;
		}
	}
	
	return format;
}
